<!doctype html>
<html lang="zh-CN">
<include file="Public:head" />

<body class="user-select">
<section class="container-fluid">
  <include file="Public:header" />
  <div class="row">
    <include file="Public:aside" />
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
      <div class="row">
        <div class="col-md-5">
          <h1 class="page-header">消费积分({$user.xf_jifen})</h1>
          
        </div>

    

        <div class="col-md-7">
          <h1 class="page-header">消费积分记录</h1>
          <div class="table-responsive">
            <table class="table table-striped table-hover">
              <thead>
                <tr>
                  <th><span class="glyphicon glyphicon-paperclip"></span> <span class="visible-lg">积分</span></th>
                  <th><span class="glyphicon glyphicon-file"></span> <span class="visible-lg">时间</span></th>
                  <th><span class="glyphicon glyphicon-list-alt"></span> <span class="visible-lg">事项</span></th>

                </tr>
              </thead>
              <tbody>
              <volist name="records" id="vo">
                <tr>
                  <td>{$vo.jifen_num}</td>
                  <td>{$vo.addtime|date="Y-m-d H:i",###}</td>
                  <td>{$vo.items}</td>

                </tr>
               </volist>
                
              </tbody>
            </table>
           </div>
        </div>
      </div>
    </div>
  </div>
</section>
<include file="Public:modal" />
<script>
//是否确认删除
$(function(){   
  $("#main table tbody tr td a").click(function(){
    var name = $(this);
    var id = name.attr("rel"); //对应id  
    if (event.srcElement.outerText === "删除") 
    {
      if(window.confirm("此操作不可逆，是否确认？"))
      {
        $.ajax({
          type: "POST",
          url: "/Category/delete",
          data: "id=" + id,
          cache: false, //不缓存此页面   
          success: function (data) {
            window.location.reload();
          }
        });
      };
    };
  });   
});
</script>
</body>
</html>
